<include file="Core:Public:header" /> {:W('Navigation')}
<link rel="stylesheet" type="text/css" media="all" href="__PLUGIN__/daterangepicker/daterangepicker-bs3.css" />
<script type="text/javascript" src="__PLUGIN__/daterangepicker/moment.js"></script>
<script type="text/javascript" src="__PLUGIN__/daterangepicker/daterangepicker.js"></script>
<div class="body-right">
	<div class="row-table">
		<div class="row-table-title">
			数据导入管理
		</div>
		<div class="row-table-body">

			<div class="panel panel-default">
				<div class="panel-heading">
				　
					<a class="pull-right btn btn-primary btn-xs" href="javascript:;" id="import_team">导入团队数据</a> 
					<a class="pull-right btn btn-primary btn-xs" href="{:U('chrm/count/add')}">导入配送员数据</a>
					<div class="clear"></div>
	
				</div>
				<div class="panel-body">
					<table class="table table-hover table-striped les">
						<thead>
							<tr>
								<th>导入时间</th>
								<th>导入类型</th>
								<th>数据日期</th>
								<th>导入文件名</th>
								<th>服务器相应文件</th>
								<th>操作人</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<volist name="olist" id="vo">
								<if condition="$vo.status eq 1">
								<tr>
									<td>{$vo.update|date="Y-m-d H:i:s",###}</td>
									<td><php>
										if($vo['type'] == 'user'){
											echo "配送员数据";
										}elseif($vo['type'] == 'team'){
											echo "团队数据";
										}else{
											echo "配送详情数据";
										}
									</php></td>
									<td>{$vo.fileid|date="Y-m-d",###}</td>
									<td>{$vo.oldname}</td>
									<td>{$vo.filename}</td>
									<td>{$vo.user_id}</td>
									<td><a href="javascript:;" id="del{$vo.id}" wid="{$vo.wid}" types="{$vo.type}" onclick="del(this.id)" >删除上传的数据</a></td>
								</tr>
								</if>
							</volist>
						</tbody>
					</table>

				</div>
			</div>
			<div class="col-md-12">{$page}</div>

		</div>
	</div>
</div>
<div class="clear"></div>
<script type="text/javascript">
	
	function del(oid){
		oids=$("#"+oid).attr("wid");
		types=$("#"+oid).attr("types");
//		alert(oids);
		window.location.href ="{:U("chrm/count/files")}&wid="+oids+'&type='+types;
		
	}
	
	function strToJson(str) {
		var json = eval('(' + str + ')');
		return json;
	}
	$('#import_team').click(function(){
		$('#alert').modal({
			show:true,
			remote:'{:U("chrm/count/team")}'
		});
	});
</script>
<include file="Core:Public:alert" />
<include file="Core:Public:footer" />